a = 0
while a < 3:
    username = input("Your Name: ")
    while not (username.lower().startswith('jz') and username.lower().endswith('nb')):
        print("请以jz开头nb结尾")
        username = input("Your Name: ")
    while 1:
        userpasswd = input("Your Paswd: ")
        if(len(userpasswd) < 8 and len(userpasswd) > 16):
            print("密码长度8-16")
            continue
        if username not in userpasswd:
            print("用户名要在密码里")
            continue
    age = input("Your Age? ")
    while not age.isdigit():
        print("请输入阿拉伯数字！")
        age = input("Your Age? ")
    if (int(age) >= 18):
        print("Name: %s" % (username.strip()))
        if (input("是否去掉名字中的空格？ yes/no") == 'yes'):
            print("Name: %s" % (username.replace(' ', '')))
        print("登入成功！")
    else:
        print("Go Out!")
        break;
